package com.docjohnson.pamphlet.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

import com.docjohnson.pamphlet.utils.Constants;

public abstract class DefaultActivity extends Activity implements Constants {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

	}

	protected void startScreenSaver() {
		startActivityForResult(new Intent(getApplicationContext(), ScreenSaverActivity.class), SCREEN_SAVER_REQUEST_CODE);
	}

	protected void finishScreenSaver() {
		setResult(Activity.RESULT_OK);
		finish();
	}

	protected void startDashboard() {
		startActivity(new Intent(getApplicationContext(), DashboardActivity.class));
		finish();
	}

	@Override
	public void startActivityForResult(Intent intent, int requestCode) {
		super.startActivityForResult(intent, requestCode);
		// overridePendingTransition(R.anim.fadein, R.anim.fadeout);
	};

	@Override
	public void startActivity(Intent intent) {
		super.startActivity(intent);
		// overridePendingTransition(R.anim.fadein, R.anim.fadeout);
		// overridePendingTransition(R.anim.pull_in_from_left, R.anim.hold);
	}
}